package com.myproject.sbp.member.api.controller;

import com.myproject.sbp.member.api.MemberApi;
import com.myproject.sbp.member.model.Member;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@RestController
public class MemberApiController implements MemberApi {

    @Override
    @RequestMapping(value = "/queryMemberList", method = RequestMethod.GET)
    public List<Member> queryMemberList() {
        try {
            Thread.sleep(1500);
        } catch (Exception e) {

        }
        Member member = new Member();
        member.setAge(1);
        member.setName("zhaoyun");
        List<Member> list = new ArrayList<>();
        list.add(member);
        return list;
    }

}